import request from '@/plugins/request';
import setting from "@/setting";
//消息列表
export function msgConfigList(data) {
    return request({
        url:'/home/message/message/configList',
        method: 'post',
        data
    });
}
//消息设置-单条更新记录值
export function msgConfigSave(data) {
    return request({
        url:'/home/message/message/configSave',
        method: 'post',
        data
    });
}
//消息设置-消息接收人列表
export function messageReceiverList(data) {
    return request({
        url:'/home/message/message/messageReceiverList',
        method: 'post',
        data
    });
}
//消息设置-消息接收人删除
export function messageReceiverDelete(data) {
    return request({
        url:'/home/message/message/messageReceiverDelete',
        method: 'post',
        data
    });
}
//消息设置-消息接收人新增
export function messageReceiverAdd(data) {
    return request({
        url:'/home/message/message/messageReceiverAdd',
        method: 'post',
        data
    });
}
//消息列表
export function messageList(data) {
    return request({
        url:'/api/web/account/pageNotice',
        method: 'get',
        params: {...data}
    });
}

//消息列表-消息类型枚举
export function messageTriggerType(data) {
    return request({
        url:'/api/web/dict/getNoticeAction',
        method: 'get',
        params: {...data}
    });
}

//标记消息为已读
export function messageRead(data) {
    return request({
        url:'/api/web/account/readNotice',
        method: 'post',
        data
    });
}
//获取未读消息数量
export function getMessageNoReadCoun(data) {
    return request({
        url:'/api/web/account/getNoticeNoReadCount',
        method: 'get',
        params: {...data}
    });
}
//标记消息为已读
export function messageFault(data) {
    return request({
        url:'/api/web/fault/findById',
        method: 'get',
        params: {...data}
    });
}
//处理消息
export function handleNotice(data) {
    return request({
        url:'/api/web/account/handleNotice',
        method: 'post',
        data
    });
}
